package com.lantosec.hmrp.modules.warning.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.warning.vo.WarningSummaryVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class WarningSummary extends BaseEntity<WarningSummaryVO> {

    private static final long serialVersionUID = 1L;
    public WarningSummary(WarningSummaryVO vo){
        this.ruleId = vo.getRuleId();
        this.ruleName = vo.getRuleName();
        this.warningTotal = vo.getWarningTotal();
        this.handleTotal = vo.getHandleTotal();
        this.notHandleTotal = vo.getNotHandleTotal();
        this.disposalRate = vo.getDisposalRate();
        this.dateCd = vo.getDateCd();
        this.startDate = vo.getStartDate();
        this.endDate = vo.getEndDate();
        this.pendingTotal = vo.getPendingTotal();
        this.disposalRejected = vo.getDisposalRejected();
        this.dataTime = vo.getDataTime();
        this.warningGrade = vo.getWarningGrade();
        this.total = vo.getTotal();
    }



    /**
     * 预警规则
     */
    private String ruleId;

    /**
     * 规则名称
     */
    private String ruleName;

    /**
     * 预警数
     */
    private String warningTotal;

    /**
     * 已处置
     */
    private Integer handleTotal;

    /**
     * 未处置
     */
    private Integer notHandleTotal;

    /**
     * 待审核
     */
    private Integer pendingTotal;

    /**
     * 处置驳回
     */
    private Integer disposalRejected;

    /**
     * 处置率
     */
    private String disposalRate;

    /**
     * 预警账期
     */
    private String dateCd;

    /**
     * 开始时间
     */
    private String startDate;

    /**
     * 结束时间
     */
    private String endDate;

    /**
     * 预警数据时间
     */
    private String dataTime;

    /**
     * 预警等级 1一级 2二级 3三级
     */
    private Integer warningGrade;

    /**
     * 预警总数
     */
    private Integer total;

    @Override
    public WarningSummaryVO convertToVO() {
        return new WarningSummaryVO(this);
    }
}
